<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>

<?php include_http_metas() ?>
<?php include_metas() ?>
<?php include_title() ?>

<link rel="shortcut icon" href="/favicon.ico" />
</head>
<body>

<div id="main">
    <div id="main_top"></div>
    <div id="header">
        <div id="header_top">
            <div class="logo"><?php echo link_to(image_tag('logo.png'),'@homepage')?></div>
                    <?php  if ($sf_user->isAuthenticated()){ ?>
           <div id="infos">
              <span>Bienvenue <?php echo $sf_user->getUsername(); ?> </span><br/>
            
         
           </div>
             <?php } ?>
        </div>
    </div>
    <div id="main_box">
        <div id="main_box_menu">
           <?php  if ($sf_user->isAuthenticated()){ ?>
          <div id="menu">
          
             <?php   if ($sf_user->isAuthenticated() && $sf_user->hasCredential("admin")): ?>
               <div class="admin" align="center"><?php echo link_to(image_tag('intranet/admin_bleu.png'),'main/index')    ?></div>
             <?php endif; ?>
             <?php   if ($sf_user->isAuthenticated() && $sf_user->hasCredential("praticien")): ?>
               <div class="medecin" align="center"><?php echo link_to(image_tag('intranet/medecin_bleu.png'),'main/index')    ?></div>
             <?php endif; ?>
             <?php   if ($sf_user->isAuthenticated() && $sf_user->hasCredential("infirmiere")): ?>
               <div class="infirmier" align="center"> <?php echo link_to(image_tag('intranet/infirmiere_bleu.png'),'main/index')    ?></div>
              <?php endif; ?>
              <?php   if ($sf_user->isAuthenticated() && $sf_user->hasCredential("webmaster")): ?>
               <div class="infirmier" align="center"> <?php echo link_to(image_tag('intranet/webmaster.png'),'main/index')    ?></div>
              <?php endif; ?>
           </div>
    
            <div id="profil">
                <h3>Informations profil</h3>
                <div class="detail">
                    <div class="legende">Nom : </div>          <div class="value"><?php echo $sf_user->getProfile()->getNom(); ?></div>  <br/>
                    <div class="legende">Prénom :</div>       <div class="value"><?php echo $sf_user->getProfile()->getPrenom(); ?></div><br/>
                    <div class="legende">Groupe : </div>       <div class="value"><?php $groupe = $sf_user->getGroupNames(); if ($groupe) echo $groupe[0]; ?></div><br/>
                    <div class="legende">Permission :  </div>  <div class="value"> <?php $permission = $sf_user->listCredentials(); if ($permission) echo $permission[0]; ?></div>     <br/>

                </div>
                <br/>
                <div class="deconnexion" style="text-align:center"><?php echo link_to(image_tag('intranet/deconnexion.png'),'sfGuardAuth/signout'); ?></div>
            </div>
             <?php } ?>
        </div>

        <div id="main_box_contenu">

         <?php  if ($sf_data->getRaw('sf_content'))
                    echo $sf_data->getRaw('sf_content');
                else { ?>
           
                  <?php   if ($sf_user->isAuthenticated() && $sf_user->hasCredential("admin")): ?>
                  <div style="float:left;width:300px;height:130px;border:2px solid #2E9AC8;background:#CCCCFF;margin-top:20px;margin-right:20px" >
                      <div style="float:left"><?php echo link_to(image_tag('intranet/1.png'),'sfGuardUser/list') ?></div>
                      <div style="float:right;margin-top:20px;margin-right:20px;font-size:10px;color:black;font-weight:bold">GESTION DES PRATICIENS</div>
                  </div>
               
                  <div style="float:left;width:300px;height:130px;border:2px solid #2E9AC8;background:#CCCCFF;margin-top:20px;margin-right:20px;" >
                      <div style="float:left"><?php echo link_to(image_tag('intranet/2.png'),'sfGuardGroup/list') ?></div>
                      <div style="float:right;margin-top:20px;margin-right:20px;font-size:10px;color:black;font-weight:bold">GESTION DES GROUPES</div>
                  </div>
               
                  <div style="float:left;width:300px;height:130px;border:2px solid #2E9AC8;background:#CCCCFF;margin-top:20px;margin-right:20px;" >
                      <div style="float:left"><?php echo link_to(image_tag('intranet/3.png'),'sfGuardPermission/list')  ?></div>
                      <div style="float:right;margin-top:20px;margin-right:20px;font-size:10px;color:black;font-weight:bold">GESTION DES PERMISSIONS</div>
                  </div>

                  <div style="float:left;width:300px;height:130px;border:2px solid #2E9AC8;background:#CCCCFF;margin-top:20px;margin-right:20px;" >
                      <div style="float:left"><?php echo link_to(image_tag('intranet/5.png'),'planning/planning')  ?></div>
                      <div style="float:right;margin-top:20px;margin-right:20px;font-size:10px;color:black;font-weight:bold">PLANNING</div>
                  </div>
                  <?php endif;?>

                 <?php   if ($sf_user->isAuthenticated() && $sf_user->hasCredential("praticien")): ?>

                  <div style="float:left;width:300px;height:130px;border:2px solid #2E9AC8;background:#CCCCFF;margin-top:20px;margin-right:20px" >
                      <div style="float:left"><?php echo link_to(image_tag('intranet/10.png'),'patient/list') ?></div>
                      <div style="float:right;margin-top:20px;margin-right:20px;font-size:10px;color:black;font-weight:bold">GESTION DES PATIENTS</div>
                  </div>

                  <div style="float:left;width:300px;height:130px;border:2px solid #2E9AC8;background:#CCCCFF;margin-top:20px;margin-right:20px;" >
                      <div style="float:left"><?php echo link_to(image_tag('intranet/8.png'),'consultation/list') ?></div>
                      <div style="float:right;margin-top:20px;margin-right:20px;font-size:10px;color:black;font-weight:bold">GESTION DES CONSULTATIONS</div>
                  </div>

                  <div style="float:left;width:300px;height:130px;border:2px solid #2E9AC8;background:#CCCCFF;margin-top:20px;margin-right:20px;" >
                      <div style="float:left"><?php echo link_to(image_tag('intranet/9.png'),'sejour/list')  ?></div>
                      <div style="float:right;margin-top:20px;margin-right:20px;font-size:10px;color:black;font-weight:bold">GESTION DES SEJOURS</div>
                  </div>
                  
                  <div style="float:left;width:300px;height:130px;border:2px solid #2E9AC8;background:#CCCCFF;margin-top:20px;margin-right:20px;" >
                      <div style="float:left"><?php echo link_to(image_tag('intranet/5.png'),'planning/planning')  ?></div>
                      <div style="float:right;margin-top:20px;margin-right:20px;font-size:10px;color:black;font-weight:bold">PLANNING</div>
                  </div>
                 <?php endif;?>
                 <?php   if ($sf_user->isAuthenticated() && $sf_user->hasCredential("infirmiere")): ?>
                  <div style="float:left;width:300px;height:130px;border:2px solid #2E9AC8;background:#CCCCFF;margin-top:20px;margin-right:20px;" >
                      <div style="float:left"><?php echo link_to(image_tag('intranet/medicament.png'),'medicament/list') ?></div>
                      <div style="float:right;margin-top:20px;margin-right:20px;font-size:10px;color:black;font-weight:bold">LISTE MEDICAMENT</div>
                  </div>

                  <div style="float:left;width:300px;height:130px;border:2px solid #2E9AC8;background:#CCCCFF;margin-top:20px;margin-right:20px;" >
                      <div style="float:left"><?php echo link_to(image_tag('intranet/6.png'),'intervention/list') ?></div>
                      <div style="float:right;margin-top:20px;margin-right:20px;font-size:10px;color:black;font-weight:bold">GESTION DES INTERVENTIONS</div>
                  </div>
                 <?php endif;?>
                 <?php   if ($sf_user->isAuthenticated() && $sf_user->hasCredential("webmaster")): ?>
                 <div style="float:left;width:300px;height:130px;border:2px solid #2E9AC8;background:#CCCCFF;margin-top:20px;margin-right:20px;" >
                      <div style="float:left"><?php echo link_to(image_tag('intranet/actualite.png'),'actualite/list') ?></div>
                      <div style="float:right;margin-top:20px;margin-right:20px;font-size:10px;color:black;font-weight:bold">GESTION DES ACTUALITES</div>
                  </div>
                 <?php endif;?>
               <?php } ?>
        </div>
    </div>
    <div id="main_footer">  </div>
</div>



</body>
</html>
